<template>
    <div>
        <h2>News-content</h2>
        <p>newsId:{{$route.params.id}}</p>
        <ul>
            <li><a href="/">home</a></li>
        </ul>
    </div>
</template>
<script>
export default {
    //校验
    validate({params}){
        return /^\d+$/.test(params.id);
    },
    data () {
        return {
            title:this.$route.params.title,
        }
    },
    head () {
        return {
            title:this.title,
            meta:[
                {hid:'description',name:'news1',content:'This is news page'}
            ]
        }
    }  
}
</script>
